package com.app.backend.activiti.service;

import com.app.backend.activiti.entity.ActBiz;
import com.app.backend.activiti.entity.ActProcess;
import com.app.backend.activiti.vo.ProcessNodeVo;
import com.app.backend.common.base.BaseService;

/**
 * @program: ActProcessService
 * @description:
 * @author: Zhun.Xiao
 * @create: 2020-02-27 09:59
 **/
public interface ActProcessService extends BaseService<ActProcess, String> {
    /**
     * 其他流程都设置为旧版本
     * @param key
     */
    void setAllOldByProcessKey(String key);

    void setLatestByProcessKey(String processKey);

    ActProcess findByProcessKeyAndLatest(String key,Boolean latest);

    ProcessNodeVo getFirstNode(String procDefId);

    ProcessNodeVo getNextNode(String procDefId, String currActId);

    ProcessNodeVo getNode(String nodeId);

    String startProcess(ActBiz act);
}